-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Disable unspecified-encoding for py-version above Python 3.15 #10800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pierre-Sassoulas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this !
|
Thanks for the fast review @Pierre-Sassoulas ! Once finished with the optimal version of the PR, I will request for re-review! Thanks again ! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10800 +/- ##
=======================================
Coverage 95.98% 95.98%
=======================================
Files 176 176
Lines 19564 19566 +2
=======================================
+ Hits 18779 18781 +2
Misses 785 785
🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Though its my first PR in this package! Need to explore a lot, I will love to work on other issues as well ! |
This comment has been minimized.
This comment has been minimized.
DanielNoord
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job! Just two comments :)
|
Thanks @DanielNoord ! & @Pierre-Sassoulas , I will love to work more on this project ! |
Pierre-Sassoulas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great merge request !
(cherry picked from commit de75d30)
|
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit 2ca7c73 |
(cherry picked from commit de75d30)
Type of Changes
Description
Closes #10791
This PR updates the behavior of the
W1514 (unspecified-encoding)warning to account forchanges introduced by PEP 686.
Starting with Python 3.15, UTF-8 becomes the default text encoding, making the absence of
an explicit
encoding=argument safe and predictable. As a result, emittingW1514bydefault for Python 3.15+ produces unnecessary false positives.
What this PR does
W1514enabled by default for Python versions < 3.15W1514by default for Python >= 3.15This reduces noise for users targeting modern Python versions while maintaining safety
checks for older environments.